netbird: switch to profile-based configuration
authorWesley Gimenes <[email protected]>
Tue, 26 Aug 2025 20:01:14 +0000 (17:01 -0300)
committerWesley Gimenes <[email protected]>
Wed, 10 Sep 2025 22:09:49 +0000 (19:09 -0300)
commit95107af880cefc5f62fbed7745825e4daed24ec5
tree2550d6332edabc74de63b4f4856c31f181e6cbde
parent56e0fe19e9e30ccc7ba2038c8298bac4779fdf3a
netbird: switch to profile-based configuration

Add support for `netbird` profiles feature [1] (introduced in 0.52.2). Use
`NB_STATE_DIR="/root/.config/netbird"` in the init file instead of the
previous `NB_CONFIG="/etc/netbird/config.json"`, and update Makefile
configuration paths accordingly.

Rationale: `netbird` saves state/configuration under `/var` by default. On
OpenWrt, `/var` is a symlink to `/tmp` (a volatile location), which would
cause config loss after reboot or reflash. Using `/root/.config/netbird`
avoids this, it's a valid upstream directory not used by default.
`netbird` will migrate existing configurations.

This change will not be backported to preserve the current meaning of
"stable" in OpenWrt and to avoid (unlikely but possible) breakage of
existing installations.

[1]: https://docs.netbird.io/how-to/profiles

Signed-off-by: Wesley Gimenes <[email protected]>
net/netbird/Makefile
net/netbird/files/netbird.init